home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Gui4Cli / Docs / Tutorials / CheckBoxes.gc < prev    next >
Encoding:
Gui4CLI script  |  1980-01-03  |  1.4 KB  |  52 lines

  1. G4C
  2.  
  3. WinBig -1 -1 250 160 "CheckBoxes.gc"
  4. WinType 11110001
  5. usetopaz
  6.  
  7. BOX 0 0 0 0 OUT RIDGE
  8. LINE 2 88 246 88 1
  9.  
  10. xonLoad 
  11. ; ---- Preset these texts to show the values of the
  12. ;      variables when we load
  13. Update CheckBoxes.gc 1 'ON'
  14. Update CheckBoxes.gc 2 'No'
  15. Update CheckBoxes.gc 3 'TRUE'
  16. GuiOpen CheckBoxes.gc
  17.  
  18. xonClose
  19. GuiQuit CheckBoxes.gc
  20.  
  21. Text 80 10 90 12 'CheckBoxes' 10 BOX
  22. Text 16 90 100 14 'Current settings of the' 25 NOBOX
  23. Text 16 99 100 14 'checkbox variables are' 25 NOBOX
  24. Text 66 114 80 14 'First ' 25 NOBOX
  25. Text 66 128 80 14 'Second ' 25 NOBOX
  26. Text 66 142 80 14 'Third ' 25 NOBOX
  27.  
  28. ; ---- These text gadgets will be updated when a checkbox is clicked
  29. Text 130 114 50 12 '    ' 25 BOX
  30. gadid 1
  31. Text 130 128 50 12 '    ' 25 BOX
  32. gadid 2
  33. Text 130 142 50 12 '    ' 25 BOX
  34. gadid 3
  35.  
  36. ; Here are the three CheckBox entries
  37. ; Each xCheckBox entry takes the following arguments :
  38. ;          L   T  W  H  Title  Var OnText OffText State
  39. ;          |   |  |  |    |     |   |     |       |
  40. xCheckBox 110 30 26 11 'First' cb1 'On' 'Off'     ON
  41. Update CheckBoxes.gc 1 '$cb1'
  42.  
  43. ; The On and OffText can be whatever you need
  44. xCheckBox 110 50 26 11 'Second' cb2 'Yes' 'No' OFF
  45. Update CheckBoxes.gc 2 '$cb2'
  46.  
  47. xCheckBox 110 70 26 11 'Third' cb3 'TRUE' 'FALSE' ON
  48. Update CheckBoxes.gc 3 '$cb3'
  49.  
  50. ; The three checkboxes used here are the 'standard' size of
  51. ; W 26 H 11, but other sizes can be used.
  52.